package org.chouy.web.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.chouy.system.domain.SysDept;
import org.chouy.system.service.ISysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * @program: Yang
 * @description: 部门控制类
 * @author: Zhouy
 * @create: 2019-03-04 14:06
 **/

@Controller
@RequestMapping("/yang/dept")
public class SysDeptController {

    @Autowired
    private ISysDeptService iSysDeptService;

    @GetMapping
    @ResponseBody
    public String getDeptList() {
        List<SysDept> list = new ArrayList<SysDept>();
        List<String> listStr = new ArrayList<String>();
        list = iSysDeptService.getDeptList();
        list.forEach(item -> {
            if (true) {
                listStr.add(item.toString());
            }
        });
        //System.out.println(string);


        return "";


    }


}
